package com.example.thread;

import lombok.SneakyThrows;

import java.util.concurrent.TimeUnit;

/**
 * create by mwh 2021-11-16
 *
 **/

public class ThreadExtend extends Thread{
    @SneakyThrows
    @Override
    public void run() {
        TimeUnit.MILLISECONDS.sleep(1000);
        System.out.println(Thread.currentThread().getName()+"开始一个extend线程");
    }

    public static void main(String[] args) {
        new ThreadExtend().start();
        System.out.println(Thread.currentThread().getName()+"main---");
    }
}
